package com.bottle.service;

import com.bottle.dto.UserDto;
import com.bottle.mode.ReJson;
import com.bottle.mode.RequestMessage;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.context.request.async.DeferredResult;

import java.util.concurrent.ExecutionException;

/**
 * @author: chenyuncong
 * @Date: 2020/4/27 15:37
 */
public interface CharService {
    /**
     * 接收信息
     * @param request
     * @return
     */
    ReJson receive(RequestMessage request) throws ExecutionException;

    /**
     * 监听接口：返回接口数据
     * @return
     */
    DeferredResult<Object> watch(@PathVariable("namespace") String namespace);


    //用户登陆
    @PostMapping("userLogin")
    ReJson userLogin(String account,String password,String code) throws ExecutionException;


}
